﻿<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ page language="java" import="java.sql.*" %>
<jsp:useBean id="connDbBean" scope="page" class="com.util.db"/>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script type="text/javascript" src="js/popup.js"></script>
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
	<TITLE>收藏查询</TITLE>
	<script type="text/javascript" src="js/My97DatePicker/WdatePicker.js" charset="gb2312"></script>
<script type="text/javascript" src="ny/js/jquery.min.js"></script>
<script type="text/javascript" src="ny/js/bootstrap.min.js"></script>
<script src="ny/js/jconfirm/jquery-confirm.min.js"></script>
<link href="ny/css/bootstrap.min.css" rel="stylesheet">
<link href="ny/css/materialdesignicons.min.css" rel="stylesheet">
<link href="ny/css/style.min.css" rel="stylesheet">
<link rel="stylesheet" href="ny/js/jconfirm/jquery-confirm.min.css">
	</head>
	<body>
	 <div class="card">
              <div class="card-header"><h4>收藏列表</h4></div>
              <div class="card-body">
			  
			   <table class="table table-hover">
  <thead>
					<th width="50" height="30">序号</th>
				 
					<th width="916" height="30" align="left" >标题</th>
 
    
					
					<th width="140" height="30">添加时间</th>
					 <th align="center"><div align="center">操作</div></th>
		        </tr>
  </thead>
   <tbody>
                          <% 
                          String sql="";
          				if(request.getParameter("scid")!=null)
          				{
          					sql="delete from shoucangjilu where   id="+request.getParameter("scid");
          						connDbBean.hsgexecute(sql);
          				}
      sql =  "select * from shoucangjilu where username='"+request.getSession().getAttribute("username")+"' order by id desc";

//	connDbBean.nmm="2005";
	ResultSet RS_result=connDbBean.executeQuery(sql);
	int i=0;

	while(RS_result.next()){
	i++;
     %>  
		<td width="50" height="45"><%=i %></td>
	 
		<td height="45" align="left"><%
		 out.print(connDbBean.readzd(RS_result.getString("biao"),RS_result.getString("ziduan"),"ID",RS_result.getString("xwid")));
		%></td>
		<td width="140" height="45" align="center"><%=RS_result.getString("addtime")%></td>
		<td width="150" height="45" align="center">
		<a  class="btn btn-primary"   href="shoucangjilu_list2.jsp?scid=<%=RS_result.getString("id")%>"
										onclick="{if(confirm('确定要删除吗?')){return true;}return false;}">删除</a>
		  
		<a class='btn btn-info' href="<%=RS_result.getString("biao")%>Detail.do?id=<%=RS_result.getString("xwid")%>"  ><i class='mdi mdi-arrow-expand-all'></i> 详细</a> 	  </td>
 	 </tr>
  <%
  }
   %>
              </tbody>
</table>
			
			
		</div>
</div>	
			
			
	</body>
</html>
<script language="javascript">
function activity_del(nid)
{
  $.confirm({
        title: '确认对话框',
        content: '您确定要删除？',
        buttons: {
            confirm: {
                text: '确认',
                action: function(){
                    location.href="deleteShoucangjilu.do?id="+nid;
                }
            },
            cancel: {
                text: '关闭',
                action: function(){
                   // $.alert('取消的!');
                }
            },
            
        }
    });
}
</script>			